<a class="btn btn-xs btn-success" id="chapter-create-btn" data-toggle="modal"
   data-target="#modal" data-backdrop="static" data-keyboard="false"
   data-url="{{route('admin.users.activity.addgoods',['id'=>$user->user_id,'redirect_url'=>urlencode(Request::getRequestUri())])}}">
    添加商品</a>
<table class="table table-hover table-striped">
    <tbody>

    <tr>
        <th>商品名称</th>
        <th>商品单价(元)</th>
        <th>分成金额(元)</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    @foreach($user->goods as $item)

        <tr>
            <td>
                <img width="50" height="50" src="{{$item->img}}" alt="">&nbsp;&nbsp;&nbsp;
                &nbsp;
                {{$item->name}}
            </td>
            <td>{{$item->sell_price}}</td>
            <td>{{$item->distribution_money}}</td>
            <td>{{$item->is_valid==1?'已启用':'无效'}}</td>
            <td>
                <a data-url="{{route('admin.activity.editgoods',['user_id'=>$user->user_id,'goods_id'=>$item->goods_id,'type'=>$item->is_valid==1?0:1])}}"
                   data-type="{{$item->is_valid}}"
                   class="btn btn-xs btn-success edit">
                    编辑状态</a>
            </td>
        </tr>
    @endforeach
    </tbody>
</table>